package com.qfedu.buy.common.config;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @program: MircoDrink
 * @description:
 * @author: Feri(邢朋辉)
 * @create: 2021-01-20 11:05
 */
public class SystemConfig {
    //结果返回状态吗
    public static final int R_OK=1;
    public static final int R_FAIL=2;
    public static final int R_FAIL_CHECK=3;

    //Redis地址
    public static final String REDIS_HOST="39.105.189.141";
    public static final int REDIS_PORT=6380;
    public static final String REDIS_PASS="qfedu";

    //安全校验
    public static final int GATEWAY_PL=20;//每秒20次请求

    //设备类型编号
    public static final String FACILITY_ANDROID="llgsb_1001";
    public static final String FACILITY_IOS="llgsb_1002";
    public static final String FACILITY_WEB="llgsb_1003";
    public static final String FACILITY_XCX="llgsb_1004";
    public static final String FACILITY_PAD="llgsb_1005";

    //认证操作类型
    public static final int OAUTH_TYPE_ADD=1101;//注册
    public static final int OAUTH_TYPE_LOGIN=1102;//登陆成功
    public static final int OAUTH_TYPE_LOGINERROR=1103;//登陆失败
    public static final int OAUTH_TYPE_UNIQUE=1104;//违反唯一登陆
    public static final int OAUTH_TYPE_PASS=1105;//修改密码
    public static final int OAUTH_TYPE_FINDPASS=1106;//找回密码

    //令牌的请求消息头
    public static final String TOKEN_HEADER="llgtoken";
    //传递请求方的ip地址
    public static final String USER_IP="llguserip";
    //传递令牌解析user id的值
    public static final String USER_ID="llguserid";

    //用户积分奖励
    public static final int USER_AWARD_REGISTER=88;
    public static final int USER_AWARD_SIGN=3;
    public static final int USER_AWARD_SIGN3=5;
    public static final int USER_AWARD_SIGN7=4;
    public static final int USER_AWARD_SIGN30=50;
    public static final int USER_AWARD_SIGN365=500;
    public static final int USER_AWARD_SIGNFIRST=100;
    public static final int USER_AWARD_CONSUME=10;//消费10元 返回1积分 不满10元也算1积分

    //积分变动的类型
    public static final int USER_SCORE_ADD=3001;
    public static final int USER_SCORE_BASESIGN=3002;
    public static final int USER_SCORE_FIRSTSIGN=3003;
    public static final int USER_SCORE_CONTISIGN=3004;
    public static final int USER_SCORE_ORDER=3005;
    public static final int USER_SCORE_CONSUME=3006;


    //系统的用户等级
    public static Map<Integer,String> levelMap;
    static {
        levelMap=new LinkedHashMap<>();
        levelMap.put(1,"白丁"); //<100
        levelMap.put(2,"童生");//<1000
        levelMap.put(3,"秀才");//<10000
        levelMap.put(4,"举人");//<100000
        levelMap.put(5,"状元");//<1000000
//        levelMap.put("白丁",0);
//        levelMap.put("童生",200);
//        levelMap.put("秀才",1000);
//        levelMap.put("举人",3000);
//        levelMap.put("状元",10000);
    }
    public static final int LEVEL_BASE=100;


    //记录OSS
    public static final int OSS_URLTIME=365;
    public static final String OSS_BNAME="neighborbuy";

    //OSS存储的类型
    public static final int OSS_TYPE1=2001;
    public static final int OSS_TYPE2=2002;
    public static final int OSS_TYPE3=2003;
    public static final int OSS_TYPE4=2004;


    //支付类型
    public static final int PAY_ALI=8001;
    public static final int PAY_WX=8002;

    //支付状态
    public static final int PAY_STATUS_NO=8101;
    public static final int PAY_STATUS_SUCCESS=8102;
    public static final int PAY_STATUS_CLOSE=8103;
    public static final int PAY_STATUS_FINASH=8104;


    //订单状态
    public static final int ORDER_STATUS_NOPAY=7001;

    //抢购订单状态
    public static final int SKILL_ORDER_NOPAY=9001;
    public static final int SKILL_ORDER_PAY=9002;
    public static final int SKILL_ORDER_TIMEOUT=9004;

    //抢购订单的默认超时时间
    public static final int SKILL_ORDER_TIME=15*60;//默认15分钟必须付款
}